﻿<UserControl x:Class="MoviePlayer.User_Controls.ControlPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="100" d:DesignWidth="400">
    <Grid x:Name="BackupControlPanel" VerticalAlignment="Bottom" Margin="20,0,20,20" Width="{Binding Width, ElementName=SSMediaElement}" MouseEnter="ControlPanel_MouseEnter" MouseLeave="ControlPanel_MouseLeave">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="50"/>
        </Grid.ColumnDefinitions>
        <Button x:Name="Button_Play" Grid.Column="0" Height="40" Width="50" VerticalAlignment="Top" Click="Button_Play_Click" HorizontalAlignment="Left" Style="{StaticResource GlassButtonStyle}">
            <Path Data="M0,0 L0,100 L50,50" Fill="#FFF4F4F5" Stretch="Fill" Stroke="White" UseLayoutRounding="False" Margin="20,5,15,5"/>
        </Button>
        <Button x:Name="Button_Pause" Grid.Column="0" Width="50" Height="40" VerticalAlignment="Top" Click="Button_Play_Click" HorizontalAlignment="Left" Style="{StaticResource GlassButtonStyle}">
            <Path Data="M0,0 L0,100 L20,100 L20,0 L0,0 M30,0 L30,100 L50,100 L50,0" Fill="#FFF4F4F5" Stretch="Fill" Stroke="White" UseLayoutRounding="False" Margin="15,5"/>
        </Button>
        <Slider x:Name="PositionSlider" 
                    Grid.Column="1"
                    Height="20" 
                    VerticalAlignment="Center" 
                    ValueChanged="PositionSlider_ValueChanged" 
                    MouseLeftButtonUp="PositionSlider_MouseLeftButtonUp"
                    Value="{Binding Position.TotalSeconds, ElementName=SSMediaElement, Mode=OneWay}" 
                    Style="{StaticResource GlassSliderStyle}" Margin="10,0,10,0"
                    LostFocus="Element_LostFocus" />
        <TextBlock x:Name="PositionText" Grid.Column="2" Margin="10,0,10,0" TextWrapping="NoWrap" Text="0" Foreground="{StaticResource FontBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10"/>
        <Button x:Name="Button_Full_Screen" Grid.Column="3" Click="Button_Full_Screen_Click" Height="40" Width="50" VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource GlassButtonStyle}">
            <Path Data="M0,0 L0,10 L-4,6 L-12,14 L-14,12 L-6,4 L-10,0 L0,0" Fill="#FFF4F4F5" Stretch="Uniform" Stroke="White" UseLayoutRounding="False" Margin="15,5"/>
        </Button>
        <Button x:Name="Button_Exit_Full_Screen" Grid.Column="3" Click="Button_Exit_Full_Screen_Click" Height="40" Width="50" VerticalAlignment="Top" HorizontalAlignment="Left" Style="{StaticResource GlassButtonStyle}" Visibility="Collapsed">
            <Path Data="M0,0 L10,0 L6,-4 L14,-12 L12,-14 L4,-6 L0,-10 L0,0" Fill="#FFF4F4F5" Stretch="Uniform" Stroke="White" UseLayoutRounding="False" Margin="15,5"/>
        </Button>
    </Grid>
</UserControl>
